package com.qf.sl.youshare.fragments;

import android.os.Bundle;
import android.provider.ContactsContract;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.qf.sl.youshare.Constants;
import com.qf.sl.youshare.R;

/**
 * Created by IDEA
 * User : sl
 * on 2015/2/4.
 * 11:23
 */

/**
 * 教程界面,显示图片部分,
 * 这个 Fragment 通过传递的参数显示不同的教程界面
 */
public class TutorialImageFragment extends Fragment {

    public TutorialImageFragment() {
    }

    @Override
    public View onCreateView
            (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        //可以获取 Fragment 的参数

        Bundle arguments = getArguments();

        int layoutId = R.layout.fragment_tutorial_image_1;

        if (arguments != null) {
            layoutId = arguments.getInt(Constants.ARG_TUTORIAL_IMAGE_LAYOUT_ID);
        }

        View ret = inflater.inflate(layoutId, container, false);

        return ret;
    }
}